package com.ybzl.collect.common.utils;



import java.io.FileOutputStream;

public class ConvertBASE64 {

    /**
     * 将文件转成base64编码字符串
     *
     * @param path
     * @return
     * @throws Exception
     */





    /**
     * 将base64字节装成文件
     *
     * @param base64Code
     * @param targetPath
     * @throws Exception
     */
    public static void toFile(String base64Code, String targetPath)
            throws Exception {
        byte[] buffer = base64Code.getBytes();
        FileOutputStream out = new FileOutputStream(targetPath);
        out.write(buffer);
        out.close();
    }


}

